package com.plian.system.wrapper.lg;

import com.plian.system.dto.lg.LawDisputeCaseTracingDTO;
import com.plian.system.entity.lg.LawDisputeCaseTracing;
import com.plian.system.mybatis.support.BaseWrapper;
import com.plian.system.vo.lg.LawDisputeCaseTracingVO;
import com.plian.system.wrapper.util.CacheWrapperUtil;
import com.plian.system.wrapper.util.WrapperUtil;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import static com.plian.system.wrapper.util.WrapperConstant.DICT_CODE_TO_NAME;
import static com.plian.system.wrapper.util.WrapperConstant.SPRING;

/**
 * @Description:
 * @Author husong
 * @Date 2023/1/31
 **/
@Mapper(componentModel = SPRING, uses = {CacheWrapperUtil.class, WrapperUtil.class})
public interface LawDisputeCaseTracingWrapper extends BaseWrapper<LawDisputeCaseTracing, LawDisputeCaseTracingDTO, LawDisputeCaseTracingVO> {

    @Override
    @Mappings(value = {
            @Mapping(source = "caseStatus", target = "caseStatusName", qualifiedByName = DICT_CODE_TO_NAME),
    })
    LawDisputeCaseTracingVO entityToVO(LawDisputeCaseTracing entity);
}
